<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class AdminConfigSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        //
        $datas=[
            [
                'name' => 'config_group',
                'title' => '配置分组',
                'group' => '',
                'type' => 'radio',
                'value' => 'base:基础设置',
                'sort'=>999,
                'created_at' => now(),
                'updated_at' => now(),
            ],
            [
                'name' => 'site_icp',
                'title' => 'ICP备案号',
                'group' => 'base',
                'type' => 'text',
                'value' => '',
                'sort'=>0,
                'created_at' => now(),
                'updated_at' => now(),
            ]
        ];
        DB::table('admin_config')->insert($datas);

        $menus=[
            [
                'parent_id' => 0,
                'order' => 2,
                'icon' => '',
                'title'=>'系统配置',
                'uri'=>'config/setting',
                'show'=>1,
                'created_at' => now(),
            ],
            [
                'parent_id' => 0,
                'order' => 2,
                'icon' => '',
                'title'=>'配置列表',
                'uri'=>'config/list',
                'show'=>1,
                'created_at' => now(),
            ],
        ];
        DB::table('admin_menu')->insert($menus);
    }
}
